const {dialog,MenuItem,app,shell} = require('electron')
const DataStore = require('../../app-store');
const dataStore = new DataStore();
const appLogin = require('../../cookie/app-login');

exports.menu = function (menu, tray) {
    menu.append(new MenuItem({
        label: 'vip视频',
        click: function(){
            appLogin.getSiteCookie('https://www.btnull.re/vipplay/', (cookie) => {
                // dataStore.setSoloCookies(cookie)
            })
        }
    }))
    menu.append(new MenuItem({
        label: '白板',
        click: function(){
            // excalidraw
            appLogin.getSiteCookie('http://127.0.0.1:15555/', (cookie) => {
                // dataStore.setSoloCookies(cookie)
            })
        }
    }))
    menu.append(new MenuItem({
        label: '网络音乐',
        click: function(){
            appLogin.getSiteCookie('http://127.0.0.1:5566/', (cookie) => {
                // dataStore.setSoloCookies(cookie)
            })
        }
    }))
    menu.append(new MenuItem({
        label: '待办事项',
        click: function(){
            appLogin.getSiteCookie('http://127.0.0.1:5230/auth', (cookie) => {
                // dataStore.setSoloCookies(cookie)
            })
        }
    }))
    tray.setTitle('插件')
}
